using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.CodeDom.Compiler;

namespace NBusiness.CodeDom.Compiler
{
    [Serializable]
	public abstract class EntityGenerator
	{
		public abstract EntityFile[] Generate(EntityRoot root);
        public abstract EntityFile Generate(Entity entity);

        public event EventHandler<EntityBuildErrorEventArgs> Error;
        protected virtual void OnError(EntityBuildError error)
        {
            if (Error != null) Error(this, new EntityBuildErrorEventArgs(error));
        }
    }
}
